package com.example.esc_im_client.db.sql_enuim.sqlFactory;

import com.example.esc_im_client.db.sql_enuim.sqlFactory.sqlEnum.SQLTableEnum;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;

/**
 * @ClassName: SqlFactory
 * @Description:
 * @Author: 墨渍
 * @Date: 2023/10/16 21:12
 * 用不上
 **/
public class SQLFactory {

    protected static volatile ConcurrentLinkedQueue<String> query = new ConcurrentLinkedQueue<String>();

    static {

    }

    private SQLFactory(){
    }

    private static class SQLFactoryHolder {
        private static final SQLFactory INSTANCE = new SQLFactory();
    }

    public static SQLFactory getInstance(){
         return SQLFactoryHolder.INSTANCE;
    }

    public List<String> getTable(){
        Iterator<String> iterator = query.iterator();
        List<String> tableSql = new ArrayList<>();
        while (iterator.hasNext()){
            String next = iterator.next();
            tableSql.add(next);
        }
        return tableSql;
    }




}
